package main

import (
	"lnzw/common/proto/common_gen"
	"lnzw/common/usage"
	"lnzw/server/gatesvr"
	"lnzw/server/logic/base"
	"lnzw/server/urlsvr"
)

func main() {
	//解析usage
	usage.Parse()
	var server base.IServer
	switch usage.USAGE.ServerType {
	case common_gen.ServerType_gate:
		server = &gatesvr.GateServer{}
	case common_gen.ServerType_url:
		server = &urlsvr.UrlServer{}
	}
	base.GlobalServer = server
	server.Start()
}
